#import <Foundation/Foundation.h>

#import "framework/FWCommon.h"


enum PIRecurranceFromDateType {
    PIRecurranceFromDateNone = -1,
    PIRecurranceFromDateDueDate = 0,
    PIRecurranceFromDateCompletionDate = 1
};

@class EKRecurrenceRule;


@interface PIRecurrance : NSObject
{
    EKRecurrenceRule* rule;
    PIRecurranceFromDateType fromDate;
}

+ (PIRecurrance*)recurranceWithRule:(EKRecurrenceRule*)newRule;
+ (PIRecurrance*)recurranceWithRule:(EKRecurrenceRule*)newRule fromDate:(PIRecurranceFromDateType)newFromDate;

- (NSString*)intervalDescription;
- (NSString*)intervalDescriptionWithWeekendStart:(FWWeekdayName)weekendStart;
- (NSString*)untilDescription;

@end
